/*
 * @Descripttion: 
 * @Author: liuYaoYu
 * @Date: 2021-12-09 17:07:28
 * @LastEditors: liuYaoYu
 * @LastEditTime: 2021-12-09 17:14:01
 */
package main
import (
	"fmt"
)

func main(){
	var count int = 0
	for i:=0;i<100;i++{
		count += i
		if count >20{
			fmt.Println("当前的count>20数为",i)
			break
		}
	}

	var name string
	var pwd string
	var loginchance int =3
	for i:=0;i<3;i++{
		fmt.Println("请输入用户名")
		fmt.Scanln(&name)
		fmt.Println("请输入密码")
		fmt.Scanln(&pwd)
		if name=="张无忌"&&pwd=="888"{
			fmt.Println("恭喜你登录成功")
			break
		}else{
			loginchance--
			fmt.Printf("你还有%v次登录机会请珍惜\n",loginchance)
		}
		if loginchance==0{
			fmt.Println("机会用完 去死吧你")
		}
	}
}